from poker_bot.core.models.dto.account import AccountDTO
from poker_bot.database.models import Account
from poker_bot.domain.account import AccountEntity


def convert_account_entity_to_db_model(account: AccountEntity) -> Account:
    return Account(
        id=account.id,
        status=account.status,
        account_id=account.account_id,
        user_id=account.user_id,
    )


def convert_db_model_to_account_entity(account: Account) -> AccountEntity:
    return AccountEntity(
        id=account.id,
        status=account.status,
        account_id=account.account_id,
        user_id=account.user_id,
    )


def convert_db_model_to_account_dto(account: Account) -> AccountDTO:
    return AccountDTO(
        id=account.id,
        status=account.status,
        user_id=account.user_id,
        account_id=account.account_id,
        created_at=account.created_at,
    )
